package com.iknow.view.widget.zoom;

import java.util.Observable;

public class ZoomState extends Observable
{
  private float mPanX;
  private float mPanY;
  private float mZoom;

  public float getPanX()
  {
    return this.mPanX;
  }

  public float getPanY()
  {
    return this.mPanY;
  }

  public float getZoom()
  {
    return this.mZoom;
  }

  public float getZoomX(float paramFloat)
  {
    return Math.min(this.mZoom, paramFloat * this.mZoom);
  }

  public float getZoomY(float paramFloat)
  {
    return Math.min(this.mZoom, this.mZoom / paramFloat);
  }

  public void setPanX(float paramFloat)
  {
    if (paramFloat != this.mPanX)
    {
      this.mPanX = paramFloat;
      setChanged();
    }
  }

  public void setPanY(float paramFloat)
  {
    if (paramFloat != this.mPanY)
    {
      this.mPanY = paramFloat;
      setChanged();
    }
  }

  public void setZoom(float paramFloat)
  {
    if (paramFloat != this.mZoom)
    {
      this.mZoom = paramFloat;
      setChanged();
    }
  }
}